<?php 
	$SearchXMLInstance = new MenuXML("web3g/xml/menu.xml");
	$mcat=$CleanCode->Decode($_GET['c']);
	if(isset($_GET['mc'])) { $mcat=$CleanCode->Decode($_GET['mc']); }
	if(isset($_GET['sc'])) { $mcat=$CleanCode->Decode($_GET['sc']); }
	$Prices = $SearchXMLInstance->GetMenu($mcat,'Price','Range');
	$Brand = $SearchXMLInstance->GetMenu($mcat,'Brand','Manufacturer');
	echo "<div id=\"searchOptions\">";
		echo "<div id=\"searchHeader\">Erweiterte Suche</div>";
		echo "	<ul>";
		echo "    <li class=\"header\"><span>nach Preis</span> <div class=\"close\"></div></li>";
		echo "    <li style=\"overflow:hidden;\">";
		echo "		<ul>";
        foreach($Prices as $tpl) {
			$tpl=str_replace('"','"',$tpl);
			$url="/search/".$_GET['c']."/";
			if(isset($_GET['mc'])) { $url .=$_GET['mc']."/"; }
			if(isset($_GET['sc'])) { $url .=$_GET['sc']."/"; }
            echo "<li class=\"submenu\"><strong><a href=\"".$url."__price_".$CleanCode->Encode($tpl['Name'])."/\">".$tpl['Name']." (".$tpl['Count'].")</a></strong></li>";
		}
		echo "       <li>&nbsp;</li></ul>";
		echo "     </li>";
		echo "   </ul>";
		echo "   <ul>";
		echo "     <li class=\"header\"><span>nach Marke</span> <div class=\"close\"></div></li>";
		echo "     <li style=\"overflow:hidden;\">";
		echo "       <ul>";
        foreach($Brand as $tpl) {
            echo "<li class=\"submenu\"><strong><a href=\"".$url."__brand_".$CleanCode->Encode($tpl['Name'])."/\">".ucfirst(strtolower($tpl['Name']))." (".$tpl['Count'].")</a></strong></li>";
		}
		echo "       <li>&nbsp;</li></ul>";
		echo "     </li>";
		echo "   </ul>";
	echo "</div>";
?>